
package com.jams.log.api.feign;

import com.jams.common.core.constant.SecurityConstants;
import com.jams.common.core.constant.ServiceNameConstants;
import com.jams.common.core.system.JamsResponse;
import com.jams.log.api.entity.SysLog;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author linxb
 * @date 2020-03-30
 */
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.LOG_SERVICE)
public interface RemoteLogService {
    /**
     * 保存日志
     *
     * @param sysLog 日志实体
     * @param from   是否内部调用
     * @return succes、false
     */
    @PostMapping("/syslog/save")
    JamsResponse<Boolean> saveLog(@RequestBody SysLog sysLog, @RequestHeader(SecurityConstants.FROM) String from);
}
